/**
	

	@author Mathew Richmond
	@version 2006-08-31
*/
class Ellipse
{
		

// ===========================================================
// - CONSTRUCTOR
// ===========================================================
	public function Ellipse() {}

	/**
		Returns an array of objects in an ellipse shape with x and y coords.
		@example
		<code>
		var myArray = Ellipse.getPoints(200, 200, 100, 10, 15);
		trace(myarray[0].x);
		</code>
	*/
	static function getPoints(x:Number, y:Number, width:Number, height:Number, numpoints:Number, offset:Number):Array {
		var arrPoints:Array = new Array();
		for (var i=0; i<numpoints; i++) {
			var angle = (360/numpoints) * i - offset; // first point 
			var rad = angle * (Math.PI/180);
			var px = x+Math.cos(rad)*width;
			var py = y+Math.sin(rad)*height;
			arrPoints.push({
				x: px,
				y: py
			});
		}
		return arrPoints;
	}
}